package com.workmanager.service;

import com.workmanager.mapper.PublishMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/**
 * Created by liao on 2016/9/7.
 */
@Service("publishNoticeJobService")
public class PublishNoticeJobService {
    @Resource(name="publishMapper")
    private PublishMapper publishMapper;

    public boolean publishNotice(Map map){
        map.put("jobTask_id","11");
        int result1 = publishMapper.publishNotice(map);
        System.out.println(map.get("jobTask_id"));
        int result2 = publishMapper.insertClassJobTask(map);
        return result1>0&result2>0;
    }
    public boolean publishJob(Map map){
        int result1 = publishMapper.publicJob(map);
        int result2 = publishMapper.insertClassJobTask(map);
        return result1>0&result2>0;
    }
}
